package com.zj.classwork;

import java.util.Scanner;

public class ClassWork13 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入年份：");
        int year = input.nextInt();
        System.out.println("请输入月份：");
        int month= input.nextInt();
        System.out.println("请输入日期：");
        int day= input.nextInt();
        int sum=0;
        for(int i=1900;i<year;i++)
        {
            if((i%4==0&&1%100!=0)||i%400==0)
            {
                sum+=366;
            }
            else{
                sum+=365;
            }
        }
        for(int j=1;j<month;j++)
        {
            switch (j){
                case 1,3,5,7,8,10,12:
                    sum+=31;
                    break;
                case 2:
                    sum+=28;
                    break;
                case 4,6,9,11:
                    sum+=30;
                    break;
            }
        }
        sum+=day-1;
        int t=sum%7;
        String s="";
        switch (t)
        {
            case 0:s="星期天";
                break;
            case 1:s="星期一";
                break;
            case 2:s="星期二";
                break;
            case 3:s="星期三";
                break;
            case 4:s="星期四";
                break;
            case 5:s="星期五";
                break;
            case 6:s="星期六";
                break;
        }
        System.out.println(year+"年"+month+"月"+day+"日为"+s);

    }
}
